import request from '@/utils/request'

// 查询业务流程节点列表
export function listWfConfigNode(query) {
  return request({
    url: '/node/wfConfigNode/list',
    method: 'get',
    params: query
  })
}

// 查询parentId为0的节点
export function parentNode(flowId, nodeType) {
  return request({
    url: '/node/wfConfigNode/parentNode/' + nodeType + '/' + flowId,
    method: 'get'
  })
}

// 查询业务流程节点详细
export function getWfConfigNode(id) {
  return request({
    url: '/node/wfConfigNode/' + id,
    method: 'get'
  })
}

// 保存业务流程节点
export function saveWfConfigNode(data) {
  return request({
    url: '/node/wfConfigNode/save',
    method: 'post',
    data: data
  })
}

// 保存复制的节点
export function saveCopyNode(data) {
  return request({
    url: '/node/wfConfigNode/saveCopyNode',
    method: 'post',
    data: data
  })
}

// 删除业务流程节点
export function delWfConfigNode(id) {
  return request({
    url: '/node/wfConfigNode/' + id,
    method: 'delete'
  })
}

// 导出业务流程节点
export function exportWfConfigNode(query) {
  return request({
    url: '/node/wfConfigNode/export',
    method: 'get',
    params: query
  })
}

// 删除关键字
export function delKeyword(id) {
  return request({
    url: '/keyword/configNodeKeyword/' + id,
    method: 'delete'
  })
}

// 删除确认事项
export function delConfirmend(id) {
  return request({
    url: '/keyword/configNodeKeyword/deleteConfirmendById/' + id,
    method: 'delete'
  })
}
